Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider the following languages.L1= {aibjck|... Start Learning for Free
Consider the following languages. 

L1 = {ai bj ck | i = j, k ≥ 1} 
L1 = {ai bj | j = 2i, i ≥ 0} 
Q. Which of the following is true?
  • a)
    L1 is not a CFL but L2 is
  • b)
    L1 ∩ L2 = ∅ and L1 is non-regular
  • c)
    L1 ∪ L2 is not a CFL but L2 is
  • d)
    There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {...
A: Both L1 and L2 are CFL 
B: L1 ∩ L2 = ∅ is true 
L1is not regular => true 
=> B is true 
C: L1 ∪ L2 is not a CFL nut L2 is CFL is closed under Union 
=> False 
D: Both L1 and L2 accepted by DPDA
View all questions of this test
Most Upvoted Answer
Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {...
Explanation:
To understand the answer, let's analyze the given languages L1 and L2 and their properties.

L1 = {a^i b^j c^k | i = j, k > 1}
This language consists of strings that have the form aibjck, where the number of a's is equal to the number of b's, and the number of c's is greater than 1. This language can be recognized by a context-free grammar or a pushdown automaton. Therefore, L1 is a context-free language (CFL).

L2 = {a^i b^j | j = 2i, i ≥ 0}
This language consists of strings that have the form aibj, where the number of a's is equal to half the number of b's. In other words, the number of b's is always twice the number of a's. This language cannot be recognized by a context-free grammar or a pushdown automaton since we cannot keep track of the number of a's to compare it with the number of b's. Therefore, L2 is not a context-free language (CFL).

Now, let's analyze the given options:

a) L1 is not a CFL but L2 is
This option is incorrect because L1 is a CFL.

b) L1 ∩ L2 = ∅ and L1 is non-regular
This option is correct. The intersection of L1 and L2 is empty (∅) since L1 contains strings with c's while L2 does not. L1 is a CFL, but it is not regular since it requires a stack to keep track of the number of a's and b's.

c) L1 ∩ L2 is not a CFL but L2 is
This option is incorrect because L1 ∩ L2 is empty (∅), which is a CFL.

d) There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2
This option is incorrect because L2 cannot be accepted by a deterministic pushdown automaton (DPDA) as it is not a CFL.

Therefore, the correct answer is option b) L1 ∩ L2 = ∅ and L1 is non-regular.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Question Description
Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer?.
Solutions for Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following languages.L1= {aibjck| i = j, k ≥ 1}L1= {aibj| j = 2i, i ≥ 0}Q. Which of the following is true?a)L1is not a CFL but L2isb)L1∩ L2= ∅ and L1is non-regularc)L1∪ L2is not a CFL but L2isd)There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev